﻿<Grid x:Class="DarklandsUiCommon.Views.Character.CharacterDetailsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:views="clr-namespace:DarklandsUiCommon.Views.Character"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <Grid.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../SharedStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Grid.Resources>

    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>

    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="2*" />
        <ColumnDefinition Width="3*" />
        <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>

    <Label Grid.Row="0" Grid.Column="1" Content="Nickname" />
    <TextBox Grid.Row="0" Grid.Column="2"
             Text="{Binding Character.ShortName, ValidatesOnDataErrors=True}"
             Style="{StaticResource ErrorTextBox}" />

    <Label Grid.Row="1" Grid.Column="1" Content="Full name" />
    <TextBox Grid.Row="1" Grid.Column="2"
             Text="{Binding Character.FullName, ValidatesOnDataErrors=True}"
             Style="{StaticResource ErrorTextBox}" />

    <Label Grid.Row="2" Grid.Column="1" Content="Age" />
    <TextBox Grid.Row="2" Grid.Column="2"
             Text="{Binding Character.Age, ValidatesOnDataErrors=True}"
             Style="{StaticResource ErrorTextBox}" />

    <Label Grid.Row="3" Grid.Column="1" Content="Shield" />
    <ComboBox Grid.Row="3" Grid.Column="2" ItemsSource="{Binding Shields}" DisplayMemberPath="Value" 
              SelectedItem="{Binding SelectedShield}" />

    <Label Grid.Row="4" Grid.Column="1" Content="Image" />
    <ComboBox Grid.Row="4" Grid.Column="2" ItemsSource="{Binding PlayerImages}" DisplayMemberPath="Value" 
              SelectedItem="{Binding SelectedPlayerImage}" />

    <Label Grid.Row="5" Grid.Column="1" Content="Gender" />
    <CheckBox Grid.Row="5" Grid.Column="2" IsChecked="{Binding IsFemale}" Content="Female" VerticalAlignment="Center"/>

    <views:CharacterColorView Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2" DataContext="{Binding Colors}"/>
</Grid>
